New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement #noqa for i18n #10107
Implement #noqa for i18n #10107
Conversation
Is there anything I can do to help this PR move forward? |
Reasonable. But I'm not sure which is a better prefix or suffix for the place of noqa. I usually use the magic comment at the tail of the line on python scripts. So I prefer placing it at the tail. I'd like to hear the opinion from @shimizukawa too. Do you have any ideas? |
This allows suppressing them using the suppress_warnings configuration variable.
dd6a074
to
b595ca1
Compare
Thanks for your feedback, @tk0miya. I have updated this PR to place #noqa at the end. |
b595ca1
to
6960d72
Compare
When cross-references in the original paragraph and the translated paragraph do not match, a warning is emitted. It is useful, because it allows to catch mistakes, but it can also be an annoyance since sometimes it is expected that the cross-references will not match. For example, a reference that is repeated in the original text may need to be factored out for good style in the target language. Another example: if the translator needs to translate a universally understood term in the source language into a term that not everyone knows is the translation of this original term, adding a reference to the glossary can be warranted. This allows the translated message to start with '#noqa' in order to disable the warning.
6960d72
to
94d78d8
Compare
Gentle ping, @shimizukawa, @tk0miya? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no objection to the method of adding #noqa
to msgstr
.
Indeed, I think that is the only place in the po file where we can specify that; the method of writing it on the comment line, like fuzzy, is not likely to be controlled by services such as transifex.
Just merged. Thank you for your contribution! |
Thanks a lot for merging! |
Feature or Bugfix
Feature
Purpose
Allow warnings about inconsistent references in translated messages to be suppressed, either globally or for one translated message individually.
Detail
type
andsubtype
when emitting these warnings, which allows to suppress them globally using thesuppress_warnings
configuration variable.#noqa
in translated message and do not warn if present.Relates
#3985